Computers store and transmit data in binary form, in which the data is represented by a series of bits. Computers communicate by sending and receiving ordered groups of bits known as packets. Packets are transmitted between computers over one or more networks.
Networks are often subject to signal noise and signal interference from various and oftentimes spurious sources. The noise and interference can cause one or more of the bits in a packet to change states as the packet traverses the network. Of course, changing one or more of the bits introduces an error in the data intended to be transferred. To guard against such errors, various error checking and protocol techniques have been developed to detect and correct errors introduced by communications between computers.
A common technique for detecting errors in packets is the use of a checksum. A checksum is a binary arithmetic sum of fixed size collections of bits, or words, which make up a particular instance of data. A checksum is typically applied with respect to each packet, but can also be applied to an entire data block formed by many packets. A source computer calculates a checksum of the packets of the data block and includes the checksum as a part of the data block sent to a destination computer. Upon receipt of the data block, the destination computer independently calculates a checksum of the packets of the data block using the same checksum calculation algorithm that the source computer used to calculate the first instance of the checksum. The destination computer then compares the calculated checksum to the transmitted checksum included in the transmitted data block. If the two checksums match, then the data received is assumed to be an accurate copy of the data sent.
While normally very effective, checksums are not entirely reliable in detecting errors, particularly packet errors involving multiple words. Communication errors can lead to certain types of data errors, such as offset errors or word interchanges, which sometimes go undetected by a checksum. An offset error occurs when a destination device for a packet, such as a router or the destination computer, mistakes the start of a data block transmission and adds or subtracts an additional word at the start of the received packet. A checksum may easily miss an offset error if the packet contains many repeated characters. For example, and assuming a word size of four bits for ease of explanation, a data block having one thousand words with bit patterns of “0000” and four words with bit patterns of “0011” in the center of the data block has a binary checksum of “1100.” If the bits of the center four words are changed due to an offset error, the checksum calculated by the destination computer will match the transmitted checksum from the source computer even though the data block received at the destination computer is different from the data block sent by the source computer.
Computer applications (“applications”) which execute functions based on data typically rely on a transport protocol to communicate data with other applications on other computers which might also be executing the same or related functions. Simplistically stated, a transport protocol is a set of rules used by the sending or source and receiving or destination computers which identify the data and separate it from other information that may be included with each data block, such as the checksum. Transmission Control Protocol (TCP) is the predominantly used transport protocol for Internet communications and is regarded as a reliable transport protocol. TCP uses a checksum to detect errors incurred during the transmission.
Since TCP is assumed to be a reliable transport protocol, applications that use TCP for communication of data rarely, if at all, incorporate their own error detection and correction mechanisms. Instead such applications rely on the error detection and correction capability of TCP. In those cases where TCP does not detect an error in one of many recently transmitted packets which together contain the data of, for example, a file, the entire file must typically be retransmitted before the application can use the file, even though the error may afflict only a very small portion of the entire file. Retransmitting an entire file or other data structure can be very time consuming, particularly when the file is relatively large or transmitted over a slow network or from a slow computer.